﻿using Cl.Model.Results;
using Cl.Utils.Primitives.Class.UploadFile;
using Cl.Utils.Primitives.Interface;
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cl.Service.Service.System.UploadFile
{
    public interface IFileService : IScopedService
    {

        /// <summary>
        /// 上传文件
        /// </summary>
        /// <param name="file">文件资源</param>
        /// <param name="uploadType">上传类型</param>
        /// <param name="id"></param>
        /// <param name="multipleFile">是否是多文件</param>
        /// <returns></returns>
        Task<ResultInfoModel> UploadFileAsync(IFormFile file, UploadType uploadType, string id, bool multipleFile = false);

        /// <summary>
        /// 删除文件(文件下的所有文件)
        /// </summary>
        /// <returns></returns>
        ResultInfoModel Delete(UploadType uploadType, string id);

        /// <summary>
        /// 删除指定名称的文件
        /// </summary>
        /// <param name="uploadType"></param>
        /// <param name="id"></param>
        /// <param name="fileName"></param>
        /// <returns></returns>
        ResultInfoModel DeleteByFileName(UploadType uploadType, string id, string fileName);

        public List<string> GetFileList(UploadType uploadType, string id);
    }



}
